/* let a = 12;
let b = a;
b = 13;
console.log(a);

let n = {name: '珠峰'};
let m = n;
m.name = '培训';
console.log(n.name); */

/* 
浏览器想要执行JS代码:
  1. 从电脑内存中分配出一块内存, 用来执行代码(栈内存 => Stack)
  2. 分配一个主线程用来自上而下执行JS代码

*/

/* let n = [10, 20];
let m = n;
let x = m;
m[0] = 100;
x = [30, 40];
x[0] = 200;
m = x;
m[1] = 300;
n[2] = 400;
console.log(n, m, x);
 */

/* let a = {
  n: 1
};
let b = a;
a.x = a = {
  n: 2
};
console.log(a.x);
console.log(b); */

let a = {
  n: 1
};
let b = a;
a.x = b;
